//package com.zdp.applet.rest.dev;
//
//import com.rabbitmq.client.AMQP;
//import com.rabbitmq.client.Channel;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.amqp.support.AmqpHeaders;
//import org.springframework.messaging.handler.annotation.Header;
//import org.springframework.messaging.handler.annotation.Payload;
//import org.springframework.stereotype.Component;
//
//import java.io.IOException;
//
///**
// * @author sesshomaru
// * @date 2021/7/10 1:11
// */
//@Slf4j
//@Component
//public class ConsumerTest {
//
//    @RabbitListener(queues = "zdp.test.queue")
//    public void consumer(@Payload String message, @Header(AmqpHeaders.DELIVERY_TAG) long deliveryTag, Channel channel) throws IOException {
//        log.info("消费消息:{}", message);
//
//        channel.basicAck(deliveryTag, false);
//        // 重新放入队列
//        //channel.basicNack(deliveryTag, false, true);
//    }
//}
